<!DOCTYPE html>
<html>
<head>
    <title>出库记录</title>
    #parse("sys/header.html")
</head>
<style>
    ::-webkit-scrollbar{
        width: 10px;
        height: 10px;
    }
    ::-webkit-scrollbar-thumb{
        border-radius: 10px;
        -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
        background: #a8a5a5;
    }
</style>
<body>
<div id="rrapp" v-cloak>
	<div v-show="showList">
        <Row :gutter="16" style="margin: 8px 0px 0px 1px">
            <div class="search-group">
                <i-col span="3">
                    <i-input v-model="q.outCode" @on-enter="query" placeholder="出库单号"></i-input>
                </i-col>
                <i-col span="3">
                    <i-input v-model="q.partName" @on-enter="query" placeholder="备件名称"></i-input>
                </i-col>
                <i-col span="3">
                    <i-input v-model="q.spec" @on-enter="query" placeholder="备件规格"></i-input>
                </i-col>
                <i-col span="3">
                    <i-input v-model="q.producor" @on-enter="query" placeholder="供应厂商"></i-input>
                </i-col>
                <i-col span="3">
                    <Date-picker  type="date" v-model="q.beginTime" placeholder="起始时间"></Date-picker>
                </i-col>
                <i-col span="3">
                    <Date-picker type="date" v-model="q.endTime" placeholder="结束时间"></Date-picker>
                </i-col>
                <i-button @click="query">查询</i-button>
                <i-button @click="reloadSearch">重置</i-button>
            </div>
            <div class="buttons-group">
            <!--    #if($shiro.hasPermission("sparepartout:review"))
                <i-button type="primary" @click="review"><i class="fa fa-gavel"></i>&nbsp;审核</i-button>
                #end
                #if($shiro.hasPermission("sparepartout:save"))
                <i-button type="info" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</i-button>
                #end
                #if($shiro.hasPermission("sparepartout:update"))
                <i-button type="warning" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</i-button>
                #end
                #if($shiro.hasPermission("sparepartout:delete"))
                <i-button type="error" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</i-button>
                #end
                -->
            </div>
        </Row>
	    <table id="jqGrid"></table>
    </div>

    <Card v-show="!showList">
        <p slot="title">{{title}}</p>
		<i-form ref="formValidate" :model="sparePartOut" :rules="ruleValidate" :label-width="80">
            <Row>
                <i-col span="11">
                    <Form-item label="出库单号" prop="outCode" v-if="sparePartOut.outCode">
                        <i-input v-model="sparePartOut.outCode" placeholder="出库单号" readonly></i-input>
                    </Form-item>
                </i-col>
            </Row>
            <!--<Row>
                <i-col span="11">
                    <Form-item label="出库单号" prop="outCode">
                        <i-input v-model="sparePartOut.outCode" placeholder="出库单号" readonly></i-input>
                    </Form-item>
                </i-col>
                <i-col span="11" offset="2">
                    <Form-item label="出库日期" prop="outDate">
                        <Date-picker type="date" format="yyyy-MM-dd" v-model="sparePartOut.outDate" placeholder="出库日期"></Date-picker>
                    </Form-item>
                </i-col>
            </Row>-->
            <Row>
                <i-col span="11">
                    <Form-item label="领用单位" prop="useUnit">
                        <i-input v-model="sparePartOut.useUnit" placeholder="领用单位"></i-input>
                    </Form-item>
                </i-col>
                <i-col span="11" offset="2">
                    <!--<Form-item label="出库仓库ID" prop="outStoreId">
                        <i-input v-model="sparePartOut.outStoreId" placeholder="出库仓库ID"></i-input>
                    </Form-item>-->
                    <Form-item label="出库仓库" prop="outStore">
                        <i-input v-model="sparePartOut.outStore" placeholder="出库仓库"></i-input>
                    </Form-item>
                </i-col>
            </Row>
            <Row>
                <i-col span="11">
                    <Form-item label="物料编码" prop="partCode">
                        <i-input v-model="sparePartOut.partCode" placeholder="物料编码" readonly icon="md-arrow-dropdown-circle" @on-click="getSparePart" ></i-input>
                    </Form-item>
                </i-col>
                <i-col span="11" offset="2">
                    <Form-item label="名称" prop="name">
                        <i-input v-model="sparePartOut.name" placeholder="名称" readonly></i-input>
                    </Form-item>
                </i-col>
            </Row>
            <Row>
                <i-col span="11">
                    <Form-item label="规格" prop="spec">
                        <i-input v-model="sparePartOut.spec" placeholder="规格" readonly></i-input>
                    </Form-item>
                </i-col>
                <i-col span="11" offset="2">
                    <Form-item label="单位" prop="partUnit">
                        <i-input v-model="sparePartOut.partUnit" placeholder="单位" readonly></i-input>
                    </Form-item>
                </i-col>
            </Row>
            <Row>
                <i-col span="11">
                    <Form-item label="货位" prop="cargoLocation">
                        <i-input v-model="sparePartOut.cargoLocation" placeholder="货位"></i-input>
                    </Form-item>
                </i-col>
                <i-col span="11" offset="2">
                    <Form-item label="出库数量" prop="outNum">
                        <i-input type="number" v-model="sparePartOut.outNum" placeholder="出库数量"></i-input>
                    </Form-item>
                </i-col>
            </Row>
            <Row>
                <i-col span="11">
                    <!--<Form-item label="维修单号ID" prop="repairNoId">
                        <i-input v-model="sparePartOut.repairNoId" placeholder="维修单号ID"></i-input>
                    </Form-item>-->
                    <Form-item label="维修单号" prop="repairNo">
                        <i-input v-model="sparePartOut.repairNo" placeholder="维修单号"></i-input>
                    </Form-item>
                </i-col>
                <i-col span="11" offset="2">
                    <!--<Form-item label="领料单号ID" prop="pickNoId">
                        <i-input v-model="sparePartOut.pickNoId" placeholder="领料单号ID"></i-input>
                    </Form-item>-->
                    <Form-item label="领料单号" prop="pickNo">
                        <i-input v-model="sparePartOut.pickNo" placeholder="领料单号"></i-input>
                    </Form-item>
                </i-col>
            </Row>
            <Row>
                <i-col span="11">
                    <!--<Form-item label="使用设备ID" prop="useDevId">
                        <i-input v-model="sparePartOut.useDevId" placeholder="使用设备ID"></i-input>
                    </Form-item>-->
                    <Form-item label="使用设备码" prop="useDevCode">
                        <i-input v-model="sparePartOut.useDevCode" placeholder="使用设备码" readonly icon="md-arrow-dropdown-circle" @on-click="getDeviceInfo" ></i-input>
                    </Form-item>
                </i-col>
                <i-col span="11" offset="2">
                    <Form-item label="使用设备" prop="useDevName">
                        <i-input v-model="sparePartOut.useDevName" placeholder="使用设备" readonly></i-input>
                    </Form-item>
                </i-col>
            </Row>
            <Row>
                <i-col span="24">
                    <Form-item label="备注" prop="remark">
                        <i-input type="textarea" v-model="sparePartOut.remark" placeholder="备注"></i-input>
                        <i-input type="hidden" v-model="sparePartOut.useDevId"></i-input>
                    </Form-item>
                </i-col>
            </Row>

            <Form-item>
                <i-button type="primary" @click="handleSubmit('formValidate')">提交</i-button>
                <i-button type="warning" @click="reload" style="margin-left: 8px">返回</i-button>
                <i-button type="info" @click="handleReset('formValidate')" style="margin-left: 8px">重置</i-button>
            </Form-item>
        </i-form>
	</Card>
</div>

<script src="${rc.contextPath}/js/spare/sparepartout.js?_${date.systemTime}"></script>
</body>
</html>
